package com.zero.qth.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zero.common.annotation.excel.Excel;
import com.zero.common.core.domain.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;



/**
 * 流水表对象 payment
 * 
 * @author cai-xu-kun
 * @date 2025-08-28
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class Payment extends BaseEntity {
    /** 流水ID */
    @Excel(name = "流水ID")
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 订单ID */
    @Excel(name = "订单ID")
    private String orderId;

    /** 订单ID */
    @Excel(name = "交易ID")
    private String transactionId;

    /** 类型（0支付 1退款） */
    @Excel(name = "类型", readConverterExp = "0=支付,1=退款")
    private Integer type;

    /** 优惠券ID */
    @Excel(name = "优惠券ID")
    private Long couponUserId;

    /** 优惠券金额 */
    @Excel(name = "优惠券金额")
    private Long couponAmount;

    /** 总金额 */
    @Excel(name = "总金额")
    private Long totalAmount;

    /** 支付金额 */
    @Excel(name = "支付金额")
    private Long payAmount;

    /** 支付渠道（0微信 1支付宝 2银行卡） */
    @Excel(name = "支付渠道", readConverterExp = "0=微信,1=支付宝,2=银行卡")
    private Integer payChannel;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    /** 回调时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "退款时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date refundTime;

}
